package com.woniuxy.book.service;

import com.woniuxy.book.entity.PageInfo;
import com.woniuxy.book.entity.UserInfo;
import com.woniuxy.book.param.userinfo.CompleteUserParam;
import com.woniuxy.book.param.userinfo.UserLoginParam;
import com.woniuxy.book.param.userinfo.UserRegisterParam;
import com.woniuxy.book.service.dto.CollectRankDTO;
import com.woniuxy.book.service.dto.ShoppingTotalDTO;
import com.woniuxy.book.service.dto.UserInfoDTO;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author li
 * @since 2024年2月09日
 */
public interface UserInfoService {

    void sendRegisterCode(String userPhone) throws Exception;

    void register(UserRegisterParam param) throws Exception;

    void sendLoginCode(String userPhone) throws Exception;

    UserInfoDTO login(UserLoginParam toBean);

    void collect(Integer userId, Integer bookId);

    void cancelCollect(Integer userId, Integer bookId);

    PageInfo selectCollectRank(Integer pageNum, Integer pageSize, Integer userId);

    List<CollectRankDTO> selectCollectRankList();

    void addShopping(Integer userId, Integer bookId, Integer number);

    void addNumber(Integer userId, Integer bookId, Integer number);

    void reduceNumber(Integer userId, Integer bookId, Integer number);

    PageInfo selectShoppingCar(Integer userId, Integer pageNum, Integer pageSize) throws Exception;

    void changeChecked(Integer bookId, Boolean checked, Integer userId);

    ShoppingTotalDTO getTotalMoney(Integer userId) throws Exception;

    void delShpping(Integer bookId, Integer userId);

    UserInfo completeUserInfo(CompleteUserParam param, Integer userId);
}
